<?php
/**
 * Created by JetBrains PhpStorm.
 * User: admin
 * Date: 03.02.13
 * Time: 18:35
 * To change this template use File | Settings | File Templates.
 */

class GaleriController extends Zend_Controller_Action {
  public function init()
  {

  }

  public function indexAction()
  {
    $storageTable = new Application_Model_DbTable_Storages();
    $images = $storageTable->fetchAll(
      $storageTable->select()
        ->where('parent_type = ', 'galeri')

    );
  }

  public function createAction()
  {
    $this->view->form = $form = new Application_Form_Upload();

    if ($this->getRequest()->isPost()) {
      if ($form->isValid($this->getRequest()->getPost())) {
        $image = new Application_Model_Galeri();
        $image->setPhoto($_FILES['image']);
      }
    }
  }
}